#ifndef SETTINGS_H
#define SETTINGS_H

#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QFileDialog>
#include <QMessageBox>
#include <QPushButton>
#include <QCheckBox>
#include <QSettings>
#include <QTextCodec>
#include <QMouseEvent>
#include <QPixmap>
#include <QSpinBox>
#include <QSlider>

#include "myintvalidator.h"

class Settings : public QDialog
{
    Q_OBJECT

public:
    Settings(QWidget *parent = nullptr);
    ~Settings();

    void setBackground();
    void setDefault();
    void OK();
    void closeWindow();

signals:
    void emitBackgroundPic(bool, QString);
    void emitSize(int, int);
    void emitWindowFixed(bool);
    void emitWindowOnTop(bool);
    void emitSetDefault();
    void emitBtnAndAppDisplay(bool, bool);
    void emitOpacity(int);

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

private:
    QString backgroundPic = "";

    QLabel *label_1;
    QLabel *label_2;
    QLabel *label_3;
    QLabel *label_4;
    QLineEdit *setWidth;
    QLineEdit *setHeight;

    QPushButton *btnOK;
    QPushButton *btnSetBackground;
    QPushButton *btnSetDefault;
    QPushButton *btnClose;

    QCheckBox *windowFixed;
    QCheckBox *windowOnTop;
    QCheckBox *btnDisplay;
    QCheckBox *appDisplay;

    QSpinBox *pSpinBox;
    QSlider *pSlider;

    bool m_move = false;
    QPoint m_startPoint;
    QPoint m_windowPoint;

};

#endif // SETTINGS_H
